#include<iostream>
#include<list>

using namespace std;

int main(void)
{
	//list<int> lt1;

	//list<int> lt2(4, 100);

	//list<int> lt3(lt2.begin(), lt2.end());

	//list<int> lt4(lt3);

	//list<int> lt1;
	//list<int> lt2(4, 100);

	//lt1 = lt2;

	//list<int> lt(4, 100);
	//list<int>::iterator it = lt.begin();
	//while (it != lt.end())
	//{
	//	cout << *it << " ";
	//	++it;
	//}
	//cout << endl;

	//list<int> lt(4, 100);
	//list<int>::iterator it = lt.end();
	//while (it != lt.begin())
	//{
	//	cout << *it << " ";
	//	--it;
	//}
	//cout << endl;

	//list<int> lt(2, 5);
	//cout << lt.empty() << endl;

	//list<int> lt(2, 5);
	//cout << lt.size() << endl;

	//list<int> lt;
	//cout << lt.max_size() << endl;

	//list<int> lt(5, 20);
	//cout << lt.front() << endl;

	//list<int> lt(5, 20);
	//cout << lt.back() << endl;

	//list<int> lt1;
	//list<int> lt2;

	//lt1.assign(4, 12);
	//lt2.assign(lt1.begin(), lt1.end());

	//list<int> lt1;
	//lt1.assign(4, 12);
	//lt1.push_front(1);
	//for (auto t : lt1)
	//{
	//	cout << t << " ";
	//}
	//cout << endl;

	//list<int> lt1;
	//lt1.assign(4, 12);
	//lt1.pop_front();
	//for (auto t : lt1)
	//{
	//	cout << t << " ";
	//}
	//cout << endl;

	//list<int> lt1;
	//lt1.assign(4, 12);
	//lt1.pop_front();
	//for (auto t : lt1)
	//{
	//	cout << t << " ";
	//}
	//cout << endl;

	//list<int> lt1;
	//lt1.assign(4, 12);
	//lt1.push_back(1);
	//for (auto t : lt1)
	//{
	//	cout << t << " ";
	//}
	//cout << endl;

	//list<int> lt1;
	//lt1.push_back(1);
	//lt1.push_back(2);
	//lt1.push_back(3);
	//lt1.push_back(4);
	//list<int>::iterator it = lt1.begin();
	//++it;
	//lt1.insert(it, 19);

	//list<int> lt1;
	//lt1.push_back(1);
	//lt1.push_back(2);
	//lt1.push_back(3);
	//lt1.push_back(4);
	//list<int>::iterator it = lt1.begin();
	//++it;
	//lt1.erase(it);

/*	list<int> lt1(3, 5);
	list<int> lt2(4, 2);
	lt1.swap(lt2)*/;

	//list<int> lt1(3, 5);
	//lt1.resize(10, 1);

	//list<int> lt1(3, 5);
	//lt1.clear();

	//list<int> lt1;
	//lt1.push_back(1);
	//lt1.push_back(2);
	//lt1.push_back(3);
	//lt1.push_back(4);
	//lt1.reverse();
	//for (auto t : lt1)
	//{
	//	cout << t << " ";
	//}
	//cout << endl;


	list<int> lt1;
	lt1.push_back(2);
	lt1.push_back(3);
	lt1.push_back(1);
	lt1.push_back(4);
	lt1.sort();
	for (auto t : lt1)
	{
		cout << t << " ";
	}
	cout << endl;

	return 0;
}